package com.suixinsanren.design.factory.demo.demo01;

public class ChicagoStylePizzaStore extends PizzaStore {

    @Override
    protected Pizza createPizza(String type) {
        switch (type) {
            case "cheese":
                return new ChicagoStyleCheesePizza();
            default:
                throw new IllegalArgumentException(type + "不合法");
        }
    }
}
